wmf = {
	//version
	version : '1.0',
	
	//data items, defined fieldDisplayer.js  Wmf.data.ownerType
	data : {},
	
    //ajax session timeout
	sessionTimeout: false,
	
	//grid's degault pageSize
	pageSize : 20,
	
	//check new version,avoid cache file.
	checkNewVersion : function(){
		//return this.version != $('jbob.version')?true:false; 
		return false;
	},
    
    //get key and event on event funtcion ,support:ie,firefox,chrome,etc.
    getKeyEvent : function(e){
		var o = {};
		o.event = window.event || e;  
		o.key = o.event.keyCode || e.which; 
		o.source = o.event.srcElement || o.event.target;
		return o;
	},
	
	util : {
		computeStrLength: function computeStrLength(str) {
			var intLength = 0;
			for(var i=0; i<str.length; i++) {
				if(str.charCodeAt(i)<0||str.charCodeAt(i)>255)
					intLength = intLength + 2;
				else
					intLength = intLength + 1;
			}
			return intLength;
		},
		obtainPageSize: function() {
			var pageSize = Wmf.common.getCookie("PageSizePlugin_pageSize");    
			return parseInt((pageSize!=null && pageSize!="")?pageSize:Wmf.pageSize);
		}
	}
};
